<%--
  Created by IntelliJ IDEA.
  User: 熊婷
  Date: 2025/6/26
  Time: 10:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>添加体重记录</title>
    <style>
        form {
            max-width: 500px;
            margin: 20px auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        input[type="text"], input[type="number"], input[type="date"] {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        button {
            background-color: #4CAF50;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
<h2>添加体重记录</h2>
<form action="${pageContext.request.contextPath}/weightrecord/add" method="post">
    <div class="form-group">
        <label for="userid">用户ID:</label>
        <input type="number" id="userid" name="userid" required>
    </div>
    <div class="form-group">
        <label for="weight">体重(kg):</label>
        <input type="text" id="weight" name="weight" required>
    </div>
    <div class="form-group">
        <label for="bodyfat">体脂率(%):</label>
        <input type="text" id="bodyfat" name="bodyfat">
    </div>
    <div class="form-group">
        <label for="createtime">记录日期:</label>
        <input type="date" id="createtime" name="createtime">
    </div>
    <button type="submit">保存</button>
</form>
</body>
</html>